<template>
    <div>
        <insehead></insehead>
        <banner :swiperlist="swiperlist"></banner>
        <icon :iconlist="iconlist"></icon>
        <fenge :nainfoo="'热销推荐'"></fenge>
        <listcom :recommendlist="recommendlist"></listcom>
        <fenge :nainfoo="'周末去哪'"></fenge>
        <weekgo :weekendlist="weekendlist"></weekgo>
    </div>
</template>

<script>
     
    import axios from "axios";
    import insehead from '../components/insehead.vue';
    import banner from '../components/banner.vue';
    import icon from '../components/icon.vue';
    import fenge from '../components/fenge.vue';
    import listcom from '../components/listcom.vue'
    import weekgo from '../components/weekgo.vue'

    export default {
        name: 'index',
        components: {
            insehead,
            banner,
            icon,
            fenge,
            listcom,
            weekgo
        },
        data(){
            return{
                swiperlist:{},
                iconlist:{},
                recommendlist:{},
                weekendlist:{}
            }
        },
        methods:{
            getinfo(){
                axios.get('/static/index.json').then((res)=>{
                    var data = res.data.data;
                    this.swiperlist = data.swiperList;
                    this.iconlist = data.iconList;
                    this.recommendlist = data.recommendList;
                    this.weekendlist = data.weekendList;
                    // console.log(data.iconList)
                })
            },
        },
        created(){
			this.getinfo();
        }
    }
</script>

<style scoped>

</style>
